package com.lihepeng.leecode.jvm;


/**
 * 验证 静态类的加载速度等等
 * 静态变量的初始化在类的加载阶段
 */
public class JVMBasicTest {
    private static JVMBasicTest jvmBasicTest01 = new JVMBasicTest();
    private static int a = 0;
    private static int b;

    public JVMBasicTest() {

        System.out.println("构造方法被执行");
        a++;
        b++;
    }
    public static JVMBasicTest getInstance() {
        return jvmBasicTest01;
    }
    public int getA() {
        return a;
    }
    public int getB() {
        return b;
    }

}
